#pragma once

class Cserial
{
public:
	Cserial(void);
	~Cserial(void);

	HANDLE m_hPort; 

	BOOL ComOpen(const LPTSTR _lpszPortName, DWORD _dwBaudRate,BYTE _nByteSize,BYTE _nParity,BYTE _nStopBits);
	
	DWORD ComWrite(const void* _pvData,DWORD _dwSize);
	
	DWORD ComRead(void* _pvData,DWORD _dwMaxSize);
	
	BOOL ComClose();
	
	BOOL InitDCB(DWORD _dwBaudRate,BYTE _nByteSize,BYTE _nParity,BYTE _nStopBits);
	
	BOOL InitCommTimeouts();
	
};
